# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年03月14日
"""
import openpyxl

myBook = openpyxl.load_workbook('成绩表.xlsx')
mySheet=myBook['成绩表']
myRange=mySheet[str(mySheet.min_row+1):str(mySheet.max_row)]
myFilterSheet=myBook.create_sheet('差等生表')
myFilterSheet.append([myCell.value for myCell in mySheet[str(mySheet.min_row):str(mySheet.min_row)]]+['总分'])
for myRow in myRange:
	myList=[myCell.value for myCell in myRow]
	myScore=sum(myList[1:])
	if myScore<350:
		myFilterSheet.append(myList+[myScore])
myBook.save('结果表-成绩表.xlsx')
